package com.tnr.scgcxx.service.info.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tnr.scgcxx.dao.info.ColorDao;
import com.tnr.scgcxx.dto.info.ColorDto;
import com.tnr.scgcxx.model.info.Color;
import com.tnr.scgcxx.service.info.ColorService;
@Service
public class ColorServiceImpl implements ColorService {

	@Autowired
	private ColorDao colorDao;
	
	@Override
	public List<Color> findColors(ColorDto colorDto) {
		return colorDao.findColors(colorDto);
	}

	@Override
	public int addColor(Color color) {
		
		return colorDao.addColor(color);
	}

	@Override
	public int deleteColorById(Integer co_id) {
		return colorDao.deleteColorById(co_id);
	}

	@Override
	public int deleteColorByIds(Integer[] co_ids) {
	
		return colorDao.deleteColorByIds(co_ids); 
	}

	@Override
	public int updateColor(Color color) {
		return colorDao.updateColor(color);
	}

	@Override
	public int updateColorStatusByIds(Integer[] co_ids, String co_status) {
		return colorDao.updateColorStatusByIds(co_ids,co_status);
	}

	@Override
	public Color findColorById(Integer co_id) {
		return colorDao.findColorById(co_id);
	}

}
